Skip to content

No 60s timeout by default#956

Open
cicoyle wants to merge 4 commits intodapr:mainfrom
cicoyle:fix-tools-not-respecting-resiliency
Open

No 60s timeout by default#956
cicoyle wants to merge 4 commits intodapr:mainfrom
cicoyle:fix-tools-not-respecting-resiliency

Conversation

@cicoyle
Copy link
Contributor

@cicoyle cicoyle commented Mar 12, 2026

Remove hardcoded 60s default timeout. Only apply if explicitly configured.

I was running a long running agent/wf and it was being killed by this and it was not respecting the resiliency configured. An SDK-level default deadline that fires before resiliency can act prevents retries from ever being attempted...

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Copilot AI review requested due to automatic review settings March 12, 2026 22:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the SDK’s implicit 60s gRPC deadline so long-running operations (e.g., workflows/LLM calls) aren’t cut off before Dapr resiliency policies and component timeouts can apply.

Changes:

  • Set DAPR_API_TIMEOUT_SECONDS default to None (no deadline unless explicitly configured).
  • Update sync and async gRPC timeout interceptors to only apply a deadline when DAPR_API_TIMEOUT_SECONDS is configured, and to pass it as a float.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
dapr/conf/global_settings.py Removes the hardcoded default gRPC timeout by setting DAPR_API_TIMEOUT_SECONDS to None.
dapr/clients/grpc/interceptors.py Applies a global gRPC timeout only when explicitly configured via settings.
dapr/aio/clients/grpc/interceptors.py Mirrors the explicit-only timeout behavior for the asyncio gRPC client.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@sicoyle sicoyle requested review from a team as code owners March 13, 2026 14:14
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.06%. Comparing base (bffb749) to head (04c81e1).
⚠️ Report is 93 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #956      +/-   ##
==========================================
+ Coverage   86.63%   89.06%   +2.43%     
==========================================
  Files          84      104      +20     
  Lines        4473     7410    +2937     
==========================================
+ Hits         3875     6600    +2725     
- Misses        598      810     +212     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

self.assertEqual(7, called_client_call_details.timeout)

@patch.object(settings, 'DAPR_API_TIMEOUT_SECONDS', None)
def test_intercept_unary_unary_no_global_timeout_no_per_call_timeout(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need a test that covers DAPR_API_TIMEOUT_SECONDS being None and timeout having a value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants